{template "nheader.html"}
<div class="container-fluid larry-wrapper">

	<section class="panel panel-padding">
		<form class="layui-form" action="" method="post">
			<div class="layui-form">
				<div class="layui-inline">
					<div class="layui-input-inline">
						<input class="layui-input" name="kw" value="{$ip}" placeholder="{dr_lang('搜索IP')}">
					</div>
				</div>
				<div class="layui-inline">
					<button class="layui-btn"><i class="fa fa-search"></i> {dr_lang('搜索')}</button>
					<a href="{dr_url('ip/add')}" class="layui-btn layui-btn-danger"><i class="fa fa-plus"></i> {dr_lang('添加')}</a>
				</div>
			</div>
		</form>
	</section>

	<section class="panel panel-padding">

		<div class="layui-form">
			<div class="table-responsive mytable">
				<form action="" method="post">
					<table class="layui-table lay-even">
						<thead>
						<tr>
                            <th width="20" align="right"><input name="deletec" id="deletec" type="checkbox" onClick="setC()" /></th>
							<th width="133" align="left">ip</th>
							<th width="131" align="left">{dr_lang('开始时间')}</th>
							<th width="131" align="left">{dr_lang('结束时间')}</th>
							<th align="left">{dr_lang('状态')}</th>
						</tr>
						</thead>
						<tbody>
						{loop $list $t}

                        <tr >
                            <td align="right"><input name="del_{$t['id']}" type="checkbox" class="deletec" /></td>
                            <td align="left"><a href="{dr_url('ip/edit', array('id'=>$t['id']))}">{$t['ip']}</a></td>
                            <td align="left">{date(TIME_FORMAT, $t['addtime'])}</td>
                            <td align="left">{if $t['endtime']}{date(TIME_FORMAT, $t['endtime'])}{/if}</td>
                            <td align="left">{if $t['endtime']}{php $time=round(($t['endtime']-$t['addtime'])/(3600)); echo $time>0?$time . dr_lang('a-aip-12') : dr_lang('a-aip-7');}{else}{dr_lang('a-aip-9')}{/if}</td>
                        </tr>
						{/loop}
					</table>
                    <input type="submit" class="btn btn-success btn-sm" value="{lang('a-del')}" name="submit_del" />&nbsp;
				</form>
			</div>
		</div>

		<div class="text-center" id="page">
			<div class="layui-box layui-laypage layui-laypage-default">
				{$pagelist}
			</div>
		</div>

	</section>

</div>


</body>
<script type="text/javascript" src="{ADMIN_THEME}js/layui/layui.js"></script>

</html>